﻿@model Seeker.AdminControllers.Controllers.AdminListCs
@{
    ViewBag.Title = "管理员";
    Layout = "~/Views/Master/_DefaultLayout.cshtml";
}

@section Title{管理员}

@section PageLevelStyle
{
    <link href="/assets/plugins/fancybox/source/jquery.fancybox.css" rel="stylesheet">
    <link href="/assets/plugins/jquery-file-upload/css/jquery.fileupload-ui.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="/assets/plugins/select2/select2_metro.css" />
    <link rel="stylesheet" href="/assets/plugins/data-tables/DT_bootstrap.css" />
    <link rel="stylesheet" href="/assets/css/pages/adminlist.css" rel="stylesheet" />
}

@section PageLevelPlugins
{
    <script type="text/javascript" src="/assets/plugins/select2/select2.min.js"></script>
    <script type="text/javascript" src="/assets/plugins/data-tables/jquery.dataTables.js"></script>
    <script type="text/javascript" src="/assets/plugins/data-tables/DT_bootstrap.js"></script>
    <script type="text/javascript" src="/assets/plugins/jquery-validation/dist/jquery.validate.min.js"></script>
    <script type="text/javascript" src="/assets/scripts/adminlist.js"></script>
    <script type="text/javascript" src="/assets/plugins/AjaxPage.js"></script>
}

@section ScriptInit
{
    $("#UserListPage").AjaxPage({
        "AjaxSource": "/Services/AUserService.asmx/GetUserList",
        "CurrentClass": "curr",
        "CurrentPage": 1,
        "ContainerID": "UserList",
        "CurrentClass":"active",
        "PageSize": 5,
        "contentType":"application/json; charset=utf-8",
        "dataType":"json",
        "DefaultParam": {
            "CurrentPage": "p",
            "PageSize": "s"
        },
        "OtherParam":{n:"", i:"", o:""},
        "Dom": '<ul>{F}<li class="prev"><a href="#">上一页</a></li>{/F}{T}<li><a href="#">{V}</a></li>{/T}{N}<li><a href="#">下一页</a></li>{/N}</ul>',
        "ReData": function (d) {
            return d.d;
        },
        "Row": function (d) {
            return '<tr data-id="' + d.UID + '">\
                        <td class="highlight">\
                            <div class="' + (d.Status ? "success" : "important") + '"></div>\
                            <a href="#">' + d.Account + '</a></td>\
                        <td>' + d.RealName + '</td>\
                        <td><a href="#">' + d.Email + '</a></td>\
                        <td>' + d.Telephone + '</td>\
                        <td>\
                            <a href="#user-info" data-toggle="modal" class="btn mini purple btn-edit"><i class="icon-edit"></i>编辑</a>\
                            <a href="#" class="btn mini black"><i class="icon-trash"></i>删除</a>\
                        </td>\
                    </tr>';
        }
    });
}

@section PageContent
{
    <div id="user-info" class="modal hide" aria-hidden="true" style="display: none;">
        <div class="modal-header">
            <button data-dismiss="modal" class="close" type="button"></button>
            <h3>用户信息修改卡</h3>
        </div>
        <div class="modal-body">
            <div class="portlet box blue tabbable">
                <div class="portlet-title">
                    <div class="caption"><i class="icon-credit-card"></i>yftkwyp</div>
                </div>
                <div class="portlet-body">
                    <div class="tabbable portlet-tabs">
                        <ul class="nav nav-tabs">
                            <li class=""><a href="#portlet_tab3" data-toggle="tab">修改密码</a></li>
                            <li class=""><a href="#portlet_tab2" data-toggle="tab">权限信息</a></li>
                            <li class="active"><a href="#portlet_tab1" data-toggle="tab">账户信息</a></li>
                        </ul>
                        <div class="tab-content">
                            <div class="tab-pane active" id="portlet_tab1">
                                <div class="row-fluid ">
                                    <div class="span2 relative">
                                        <div class="member_pic">
                                            <div class="pic_bg">
                                                <img src="/upload/mypic.png" />
                                            </div>
                                            <div class="pic_upload">
                                                <span class="btn green fileinput-button">
                                                    <i class="icon-retweet icon-white"></i>
                                                    <span>更换头像</span>
                                                    <input type="file" id="face_upload" name="files" multiple="">
                                                </span>
                                            </div>
                                            <div class="member_uid">
                                                UID: 10000
                                            </div>
                                        </div>
                                    </div>
                                    <div class="span5">
                                        <div class="left-container">
                                            <form action="#" class="form-horizontal" name="base">
                                                <div class="control-group">
                                                    <label class="control-label">用户组</label>
                                                    <div class="controls">
                                                        <select name="grouplist" class="small m-wrap" tabindex="1">
                                                            @foreach (Seeker.Model.Interface.IAdminGroupInfo item in Model.AdminGroup)
                                                            {
                                                                <option value="@item.GID">@item.Name</option>
                                                            }
                                                        </select>
                                                    </div>
                                                </div>
                                                <div class="control-group">
                                                    <label class="control-label">真实姓名</label>
                                                    <div class="controls input-icon">
                                                        <input type="text" placeholder="真实姓名" name="realname" class="m-wrap small">
                                                        <span class="input-success tooltips" data-original-title="Success input!">
                                                            <i class="icon-ok hide"></i>
                                                        </span>
                                                    </div>
                                                </div>
                                                <div class="control-group">
                                                    <label class="control-label">联系电话</label>
                                                    <div class="controls input-icon">
                                                        <input type="text" placeholder="联系电话" name="phone" class="m-wrap small">
                                                        <span class="input-success tooltips" data-original-title="Success input!">
                                                            <i class="icon-ok hide"></i>
                                                        </span>
                                                    </div>
                                                </div>
                                                <div class="control-group">
                                                    <label class="control-label">QQ</label>
                                                    <div class="controls input-icon">
                                                        <input type="text" placeholder="QQ" name="QQ" class="m-wrap small">
                                                        <span class="input-success tooltips" data-original-title="Success input!">
                                                            <i class="icon-ok hide"></i>
                                                        </span>
                                                    </div>
                                                </div>
                                                <div class="control-group">
                                                    <label class="control-label">电子信箱</label>
                                                    <div class="controls input-icon">
                                                        <input type="text" placeholder="电子信箱" name="Email" class="m-wrap medium">
                                                        <span class="input-success tooltips" data-original-title="Success input!">
                                                            <i class="icon-ok hide"></i>
                                                        </span>
                                                    </div>
                                                </div>
                                            </form>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="tab-pane" id="portlet_tab2">
                                <p>
                                    暂不开放
                                </p>
                            </div>
                            <div class="tab-pane" id="portlet_tab3">
                                <form action="#" class="form-horizontal">
                                    <div class="control-group">
                                        <label class="control-label">原始密码</label>
                                        <div class="controls input-icon">
                                            <input type="password" placeholder="原始密码" class="m-wrap medium">
                                            <span class="input-success tooltips" data-original-title="Success input!">
                                                <i class="icon-ok hide"></i>
                                            </span>
                                        </div>
                                    </div>
                                    <div class="control-group">
                                        <label class="control-label">新的密码</label>
                                        <div class="controls input-icon">
                                            <input type="password" placeholder="新的密码" class="m-wrap medium">
                                            <span class="input-success tooltips" data-original-title="Success input!">
                                                <i class="icon-ok hide"></i>
                                            </span>
                                        </div>
                                    </div>
                                    <div class="control-group">
                                        <label class="control-label">确认密码</label>
                                        <div class="controls input-icon">
                                            <input type="password" placeholder="确认密码" class="m-wrap medium">
                                            <span class="input-success tooltips" data-original-title="Success input!">
                                                <i class="icon-ok hide"></i>
                                            </span>
                                        </div>
                                    </div>
                                    <div class="form-actions">
                                        <button type="submit" class="btn blue"><i class="icon-ok"></i>修改</button>
                                        <button type="button" class="btn">取消</button>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="portlet box light-grey">
        <div class="portlet-title">
            <div class="caption"><i class="icon-group"></i>管理员</div>
            <div class="tools">
                <a href="javascript:;" class="collapse"></a>
                <a href="javascript:;" class="reload"></a>
            </div>
        </div>
        <div class="portlet-body">
            <!--BEGIN TABS-->
            <div class="tabbable tabbable-custom">
                <ul class="nav nav-tabs">
                    <li class="active"><a href="#tab_1_1" data-toggle="tab">管理员信息</a></li>
                    <li class=""><a href="#tab_1_2" data-toggle="tab">回收站(20)</a></li>
                </ul>
                <div class="tab-content">
                    <div class="tab-pane active" id="tab_1_1">
                        <div class="clearfix">
                            <div class="btn-group">
                                <button id="sample_editable_1_new" class="btn green">
                                    添加 <i class="icon-plus"></i>
                                </button>
                                <input type="text" placeholder="账号/ID" class="m-wrap medium ml">
                            </div>
                            <div class="btn-group pull-right">
                                <button class="btn dropdown-toggle" data-toggle="dropdown">
                                    功能 <i class="icon-angle-down"></i>
                                </button>
                                <ul class="dropdown-menu pull-right">
                                    <li><a href="#">正常用户</a></li>
                                    <li><a href="#">异常用户</a></li>
                                    <li><a href="#">全部用户</a></li>
                                </ul>
                            </div>
                        </div>
                        <table class="table table-striped table-bordered table-advance table-hover">
                            <colgroup>
                                <col style="width: 200px" />
                                <col style="width: 160px" />
                                <col />
                                <col style="width: 160px" />
                                <col style="width: 145px" />
                            </colgroup>
                            <thead>
                                <tr>
                                    <th><i class="icon-credit-card"></i>账号</th>
                                    <th><i class="icon-user"></i>姓名</th>
                                    <th><i class="icon-envelope"></i>电子信箱</th>
                                    <th><i class="icon-phone"></i>联系电话</th>
                                    <th></th>
                                </tr>
                            </thead>
                            <tbody id="UserList">
                                
                            </tbody>
                        </table>
                        <div id="UserListPage" class="dataTables_paginate paging_bootstrap pagination">
                            <ul>
                                <li class="prev disabled"><a href="#">← Prev</a></li>
                                <li class="active"><a href="#">1</a></li>
                                <li><a href="#">2</a></li>
                                <li><a href="#">3</a></li>
                                <li><a href="#">4</a></li>
                                <li><a href="#">5</a></li>
                                <li class="next"><a href="#">Next → </a></li>
                            </ul>
                        </div>
                    </div>
                    <div class="tab-pane" id="tab_1_2">
                        <p>Page 2</p>
                    </div>
                </div>
            </div>
            <!--END TABS-->
        </div>
    </div>
}